#include <gtk/gtk.h>

static void cb(GtkWidget *widget, gpointer data)
{
  g_print("toggled");
  if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widget)))
    g_print(" active *_*");
  g_print("\n");
}




int main(int argc, char *argv[])
{
  GtkWidget *window, *toggle_button;

  gtk_init(&argc, &argv);

  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
  
  g_signal_connect (G_OBJECT (window), "destroy",
		    G_CALLBACK (gtk_main_quit), NULL);

  toggle_button = gtk_toggle_button_new_with_label("toogle button");
  gtk_container_add(GTK_CONTAINER(window), toggle_button);

  g_signal_connect(toggle_button, "toggled",
		   G_CALLBACK(cb), NULL);

  gtk_widget_show_all(window);
  gtk_main();
  return 0;
}
